#ifndef MY_CONSOLE_H
#define MY_CONSOLE_H

#include "vt100.h"

void StoreScreen();
void RestoreScreen();
void EnableCursor();
void DisEnableCursor();
void MoveCursorTo(uint16_t x, uint16_t y);

void SetBgColor(vt_back_color bgColor);

void SetFgColor(vt_fore_color fgColor);

void FillBox(uint16_t x, uint16_t y, uint16_t width, uint16_t height);

void RenderBox(uint16_t x, uint16_t y, uint16_t width, uint16_t height);
void MoveUp(uint16_t l);
void MoveDown(uint16_t l);

void MoveRight(uint16_t l);

void MoveLeft(uint16_t l);

void DrawStrAtPos(uint16_t x, uint16_t y, char* str);
void DrawHorizontalLine(uint16_t x, uint16_t y, uint16_t l);
void DrawVerticalLine(uint16_t x, uint16_t y, uint16_t l);

typedef struct
{
    uint32_t x;
    uint32_t y;
} STPoint;

typedef struct
{
    STPoint p;
    uint32_t width;
    uint32_t height;
} STRect;

void DrawCenterStrInRectUTF8(const char *str, uint64_t leng, STRect *rect);

#endif